﻿using System;

namespace Moonlite.Data.Configuration
{
    /// <summary>
    /// Provides data for assemblies whose configuration has been loaded.
    /// </summary>
    public class ConfigurationAssemblyLoadEventArgs : EventArgs
    {
        readonly AssemblyConfigurationAttachment attachment;

        /// <summary>
        /// Gets the attachment.
        /// </summary>
        /// <value>The attachment.</value>
        public AssemblyConfigurationAttachment Attachment
        {
            get { return attachment; }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigurationAssemblyLoadEventArgs"/> class.
        /// </summary>
        /// <param name="attachment">The attachment.</param>
        internal ConfigurationAssemblyLoadEventArgs(AssemblyConfigurationAttachment attachment)
        {
            if (attachment == null)
            {
                throw new ArgumentNullException("attachment");
            }

            this.attachment = attachment;
        }
    }
}
